package com.unknowpupil.web.service;

import com.unknowpupil.web.base.BaseCrudService;
import com.unknowpupil.web.base.Result;
import com.unknowpupil.web.component.wallet.entity.CoinWallet;
import com.unknowpupil.web.domain.Account;
import com.unknowpupil.web.domain.AccountInfo;
import com.unknowpupil.web.exception.MxException;

/**
 * @Classname: ${NAME}
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2019/11/6 14:21
 * @Description:
 * @Version: 1.0
 */
public interface IAccountInfoService extends BaseCrudService<AccountInfo> {
    /**
     * 封装实体类
     * @param password
     * @param account
     * @param ethWallet
     * @return
     * @throws MxException
     */
    AccountInfo createAccountInfo(String password, Account account, CoinWallet ethWallet) throws MxException;

    /**
     * 获取用户资源信息
     * @param id
     * @return
     */
    Result getAccountInfo(String id);

    /**
     * 查看接收方地址是不是本系统的
     * @param to
     * @return
     */
    int findAddressByTo(String to);

    /**
     * 根据地址查询用户名
     * @param address
     * @return
     */
    String findUserNameByAddress(String address);
}
